﻿using BBICMS.Model.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace BBICMS.Model.ViewModel.Identity
{
    public class EditProfileVM
    {
        [Required]
        public Guid Id { get; set; }

        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Display(Name = "姓名")]
        public string RealName { get; set; }

        [Display(Name = "生日")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime? Birthday { get; set; }

        [Display(Name = "电子邮箱"),Required, EmailAddress(ErrorMessage = "格式不正确")]
        [Remote("IsEmailUniqueAtEdit", "User", AdditionalFields = "Id", ErrorMessage = "邮箱{0}已经被使用")]     
      
        public string Email { get; set; }

        [Display(Name = "激活")]
        public bool IsActive { get; set; }       

        [Display(Name = "性别")]
        public Gender Gender { get; set; }
        [Display(Name = "腾讯QQ")]     
        public string QQ { get; set; }
        [Display(Name = "手机")]   
        public string Mobile { get; set; }
    }
}
